﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo02
{
    class Program
    {
        static void Main(string[] args)
        {
            Cat cat = new Cat();
            a(cat);
            t(cat);
            Console.WriteLine();

            Dog dog = new Dog();
            a(dog);
            s(dog);
            Console.WriteLine();

            Duck duck = new Duck();
            a(duck);
            s(duck);
            Console.WriteLine();

            Monkey monkey = new Monkey();
            a(monkey);
            t(monkey);

            Console.ReadLine();
        }
        public static void t(Tree t)
        {
            t.Tree();
        }
        public static void s(Swim s)
        {
            s.Swim();
        }
        public static void a(Animal a)
        {
            a.Eat();
        }
    }
}
